package thread;

import java.lang.reflect.Array;

public class ArrayTest {
    public static void main(String[] args) {
        Object or= Array.newInstance(double.class,20);
        Array.set(or,0,3.1);
        Array.set(or,1,3.15);
        Array.set(or,2,3.90);
        System.out.println(Array.get(or,2));
        double []d=(double[])or;
        for(double dd:d)
            System.out.print(dd+" ");
    }
}
